#!/usr/bin/env python


import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from runtest_dalton import Filter, TestRun

test = TestRun(__file__, sys.argv)

f = Filter()

# enehf
f.add(string = 'Final HF energy',
      rel_tolerance = 1.0e-9)

# pcmsol
f.add(string = 'LOOKING UP INTERNALLY STORED DATA FOR SOLVENT',
      rel_tolerance = 1.0e-5)

# surf
f.add(string = 'Surface area',
      rel_tolerance = 1.0e-7)

# nucchg
f.add(string = 'NUCLEAR APPARENT CHARGE',
      rel_tolerance = 1.0e-4)

# tramom
f.add(string = ' STATE NO: ',
      rel_tolerance = 1.0e-4)

f.add(string = '@ Excitation energy :',
      rel_tolerance = 1.0e-5)

f.add(string = '@ Oscillator strength (LENGTH)',
      rel_tolerance = 1.0e-3)

test.run(['pcm_excit.dal'], ['CH2Op2_STO-3G_sym.mol'], f={'out': f})

sys.exit(test.return_code)
